﻿using System.Reflection;

namespace TMIS.DALFactory
{
    public sealed class DALFactory
    {
        private static readonly string path = "TMIS.DAL";
        public DALFactory()
        { }
        public static DAL.Department CreateDepartment()
        {
            string classname = path+".Department";
            return (DAL.Department)Assembly.Load(path).CreateInstance(classname);
        }
        public static DAL.Profession CreateProfession()
        {
            string classname = path + ".Profession";
            return (DAL.Profession)Assembly.Load(path).CreateInstance(classname);
        }
        public static DAL.Grade CreateGrade()
        {
            string clsssname = path + ".Grade";
            return (DAL.Grade)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static  DAL.Classes CreateClass()
        {
            string clsssname = path + ".Classes";
            return (DAL.Classes)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Thesis CreateThesis()
        {
            string clsssname = path + ".Thesis";
            return (DAL.Thesis)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.TitleSource CreateTitleSource()
        {
            string clsssname = path + ".TitleSource";
            return (DAL.TitleSource)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Teacher CreateTeacher()
        {
            string clsssname = path + ".Teacher";
            return (DAL.Teacher)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Student CreateStudent()
        {
            string clsssname = path + ".Student";
            return (DAL.Student)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Education CreateEducation()
        {
            string clsssname = path + ".Education";
            return (DAL.Education)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.ProfessionTitle CreateProfessionTitle()
        {
            string clsssname = path + ".ProfessionTitle";
            return (DAL.ProfessionTitle)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Approval CreateApproval()
        {
            string clsssname = path + ".Approval";
            return (DAL.Approval)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.OpenReport CreateOpenReport()
        {
            string clsssname = path + ".OpenReport";
            return (DAL.OpenReport)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.InstructionOpinion CreateInstructionOpinion()
        {
            string clsssname = path + ".InstructionOpinion";
            return (DAL.InstructionOpinion)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.ReviewOpinion CreateReviewOpinion()
        {
            string clsssname = path + ".ReviewOpinion";
            return (DAL.ReviewOpinion)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Reply CreateReply()
        {
            string clsssname = path + ".Reply";
            return (DAL.Reply)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Identify CreateIdentify()
        {
            string clsssname = path + ".Identify";
            return (DAL.Identify)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Recommend CreateRecommend()
        {
            string clsssname = path + ".Recommend";
            return (DAL.Recommend)Assembly.Load(path).CreateInstance(clsssname);
        }
        public static DAL.Summary CreateSummary()
        {
            string clsssname = path + ".Summary";
            return (DAL.Summary)Assembly.Load(path).CreateInstance(clsssname);
        }
    }
}
